/**
 * Created by meiguizhinian on 2018/7/10
 * Copyright © 2018 lixiaolong. All rights reserved.
 */

//排除相切
jssupport.rectIntersectsRect = function (ra, rb) {
	let maxax = ra.x + ra.width,
		maxay = ra.y + ra.height,
		maxbx = rb.x + rb.width,
		maxby = rb.y + rb.height;
	return !(maxax <= rb.x || maxbx <= ra.x || maxay <= rb.y || maxby <= ra.y);
};

jssupport.rectContainsRect = function (rect1, rect2) {
	return ((rect1.x <= rect2.x) && (rect1.y <= rect2.y) &&
		( rect1.x + rect1.width >= rect2.x + rect2.width) &&
		( rect1.y + rect1.height >= rect2.y + rect2.height));
};